Skip to content

Instantly share code, notes, and snippets.

@ChristianAlexander
ChristianAlexander / detect.livemd
Last active May 11, 2024 16:12
Face Detection in Elixir

Face Detection in Elixir

Mix.install(
  [
    {:evision, "~> 0.1"},
    {:kino, "~> 0.7"}
  ],
using module ActiveDirectory
using namespace System.Reflection
function Convert-ADFilter {
<#
.SYNOPSIS
Converts PowerShell-style filters used by the AD module into LDAP filters.
.DESCRIPTION
Convert-ADFilter uses the QueryParser from the AD module to convert PowerShell-style filters into LDAP
@keilmillerjr
keilmillerjr / Creating an AUR Package.md
Last active May 11, 2024 16:08
How to create and manage an AUR package. #AUR #ARCH #makepkg #PKGBUILD
@mdPlusPlus
mdPlusPlus / badblocks.txt
Last active May 11, 2024 16:05
How to check new hard drives with badblocks
badblocks -b 4096 -p 0 -s -t 0 -v -w DEVICE
-b block_size
-p num_passes
-s Show the progress of the scan
-t test_pattern
-v Verbose mode
-w Use write-mode test
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

/* Merge sort in C */
#include<stdio.h>
#include<stdlib.h>
// Function to Merge Arrays L and R into A.
// lefCount = number of elements in L
// rightCount = number of elements in R.
void Merge(int *A,int *L,int leftCount,int *R,int rightCount) {
int i,j,k;
@luxplanjay
luxplanjay / flex-basis-calc.css
Last active May 11, 2024 15:56
Формула расчёта ширины flex-элемента в сетке
.element {
flex-basis: calc((100% - кол-во маржинов в строке * значение маржина) / кол-во элементов в строке);
}
@FlandreDaisuki
FlandreDaisuki / slido-mark-as-read.user.js
Created May 11, 2024 15:43
安裝 Tampermonkey 後,點 Raw 下載→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→↘
// ==UserScript==
// @name slido mark as read
// @namespace https://flandre.tw
// @version 0.0.1
// @description Add "mark as read" function to slido question
// @author FlandreDaisuki
// @match https://app.sli.do/event/*
// @require https://unpkg.com/winkblue@0.0.5/dist/winkblue.umd.js
// @icon https://www.google.com/s2/favicons?sz=64&domain=sli.do
// @grant none
@hakerdefo
hakerdefo / sources.list
Created June 11, 2023 18:47
Debian 12 "bookworm" complete sources.list
deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware